Again, you can copy this program from the scrolling text field and paste it into a new TC source file. Sample output is shown below, with the user's responses in <> braces.
Enter student id number:
<45>
Enter age and weight separated by spaces:
<12 67>
My id number is 45
My age is 12
My weight is 67
(A few bugs will occur if C++ is used in place of TC. These differences are discussed in Chapter 4 and summarized in Appendix 2. Chapter 7 describes how to write TC programs which will compile equally well under C++.)
Notice that the only change to the main() function is that the person variable now points to a Student object.